const express = require('express');
const router = express.Router();
const reportController = require('../controllers/reportController');
const authMiddleware = require('../middlewares/authMiddleware');

/**
 * @route   GET /api/reports/activity
 * @desc    获取销售活跃度报告数据
 * @access  Admin
 */
router.get('/activity', authMiddleware.isAdmin, reportController.getActivityReport);

/**
 * @route   GET /api/reports/messages
 * @desc    获取消息统计数据
 * @access  Admin
 */
router.get('/messages', authMiddleware.isAdmin, reportController.getMessageStats);

/**
 * @route   GET /api/reports/dashboard/stats
 * @desc    获取管理员仪表盘统计数据
 * @access  Admin
 */
// 临时禁用认证，仅用于开发测试
router.get('/dashboard/stats', reportController.getDashboardStats);

/**
 * @route   GET /api/reports/user-dashboard
 * @desc    获取普通用户仪表盘统计数据
 * @access  Private
 */
router.get('/user-dashboard', authMiddleware.authenticate, reportController.getUserDashboardStats);

module.exports = router; 